package com.example.designpatterns.observerPattern;

public class Client {

    public static void main(String[] args) {

        // 被观察者
        WeatherData weatherData = new WeatherData();

        //观察者
         Observer observer = new BaiduSite();
        Observer conditions = new CurrentConditions();
        //注册进观察者
        weatherData.registerObserver(observer);
        weatherData.registerObserver(conditions);

        // 被观察者信息发生变化
        weatherData.setData(10.3f,35f,22f);


    }


}
